<%@page	import="java.util.ArrayList,com.alibaba.dubbo.demo.bean.SysUserinfo"%>
<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@page import="java.lang.Integer"%>
<%@page import="java.lang.String"%>
<%@page	import="com.point.community.bean.dwzPageData"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
	 dwzPageData dwzData;
     if(request.getSession().getAttribute("userInfoDwzData")!=null)
     	dwzData =(dwzPageData)request.getSession().getAttribute("userInfoDwzData"); 
     else
     	dwzData = new dwzPageData();
%>
<script type="text/javascript">
	//alert('<%=dwzData.totalCount%>');
</script>
<div class="pageContent">
	<div id="userinfoleft" class="unitBox" style="float:left; display:block; overflow:auto; width:800px;border-left:1px #B8D0D6 solid;">
		<div class="pageHeader">
	    <form id="pagerForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="webQueryAllSysUserDeptInfo" method="post">
	        <input type="hidden" name="pageNum" value="<%=dwzData.currentPage%>" />
	        <input type="hidden" name="numPerPage" value="<%=dwzData.numPerPage%>" />  
	        <input type="hidden" name="method" value="page" />
	        <div class="searchBar">
	            <table class="searchContent">
					<tr>
						<td>用户帐号：<input type="text" name="usercode"
							value="<s:property value="#session.usercode" />" />
						</td>
						<td>用户名称：<input type="text" name="username"
							value="<s:property value="#session.username" />" />
						</td>
						<td>
								<div class="buttonActive">
								<div class="buttonContent">
									<button type="submit">检索</button>
								</div>
							</div>
						</td>		
					</tr>
				</table>
				
	        </div>
	    </form>
	</div>
	<div class="pageContent">
	    <div class="panelBar">
	        <ul class="toolBar">
	            <li class="line">line</li>
	            <li><a class="add" href="userinfoadd.jsp?cmd=add" target="navTab" ><span>添加新用户</span></a></li>
	            <li class="line">line</li>
	        </ul>
	    </div>
	    <table class="table" layoutH="108">
			<thead>
				<tr>
					<th width="40">序号</th>
					<th width="120">部门</th>
					<th width="80">用户名称</th>
					<th width="80">用户帐号</th>
					<th width="120">电话</th>
					<th width="160">备注</th>
					<th width="160">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作</th>
				</tr>
			</thead>
			<tbody>
				<% 
					int nIndex = 1;
				%>
				<s:iterator value="#session.sysUserinfoList" status="m">
					<tr target="sid_user" rel="<s:property value="userid" />">
						<td><%=nIndex %></td> 
						<% 
							nIndex ++;
						%>
						<td><s:property value="deptname" /></td>
						<td><s:property value="username" /></td>
						<td><s:property value="usercode" /></td>
						<td><s:property value="phone" /></td>
						<td><s:property value="remark" /></td>
						<td>
						<a class="edit" href="./webQuerySysUserInfoByUserCode?usercode=<s:property value="usercode"/>&deptname=<s:property value="deptName"/>" target="navTab">修改</a>
							&nbsp;&nbsp;&nbsp;
						<s:if test='usercode == "admin"'>
						     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
						</s:if>
						<s:else>
						   <a  class="delete" href="./webeleteUserInfo?usercode=<s:property value="usercode"/>"  title="确定要删除吗?" target="ajaxTodo" refresh="true">删除</a>
						</s:else>
						&nbsp;&nbsp;&nbsp;
						<a href="./userrole.jsp?userid=<s:property value="userid"/>&usercode=<s:property value="usercode"/>" target="ajax" rel="userinforight">角色列表</a></td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		<div class="panelBar">
	        <div class="pages">
	            <span>显示</span>
	            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
	                <option value="10" <s:if test="10 == #session.numPerPage">selected="selected"</s:if>>10</option>
	                <option value="20" <s:if test="20 == #session.numPerPage">selected="selected"</s:if>>20</option>
	                <option  value="50"  <s:if test="50 == #session.numPerPage">selected="selected"</s:if>>50</option>
	                <option  value="100"  <s:if test="100 == #session.numPerPage">selected="selected"</s:if>>100</option>
	            </select>
	            <span>条，共<%=dwzData.totalCount%>条</span>
	        </div>
	        <div class="pagination" targetType="navTab" totalCount= "<%=dwzData.totalCount%>" numPerPage="<%=dwzData.numPerPage%>" pageNumShown="<%=dwzData.pageNumShown%>" currentPage="<%=dwzData.currentPage%>" ></div>
	    </div>
	</div>
</div>
<div id="userinforight" class="unitBox" style="margin-left:803px;border-left:1px #B8D0D6 solid;">
	<div class="pageHeader">
		    <form id="pagerForm" rel="pagerForm" onsubmit="return navTabSearch(this);" action="webQueryAllSysRole" method="post">
		        <input type="hidden" name="method" value="page" />
		        <div class="searchBar">
		            <table class="searchContent">
						<tr>
							<td></td>
						</tr>
					</table>
		        </div>
		    </form>
		</div>
		<div class="pageContent">
			<div class="panelBar">
		        <ul class="toolBar">
		            <li class="line"></li> 
		            <li><a class="add" ><span>角色列表:</span></a></li>
		        </ul>
		    </div>
		    <table class="table" layoutH="118">
				<thead>
					<tr>
						<th width="160">角色编码</th>
						<th width="260">角色名称</th>
					</tr>
				</thead>
				<tbody id="rolebody">
				
				</tbody>
			</table>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="savedata()">保存</button></div></div></li>
			</ul>
		</div>
	</div>
</div>
<script type="text/javascript">
		$("body").ready(function(){
			if(canWriteData('func00203')!=1)
			{
				$('.add').hide();
				$('.edit').hide();
				$('.delete').hide();
			}
		});
</script>
</div> 